import {getBanner} from '../../api/api'
import {Dispatch} from 'redux'
import {SETBANNERLIST} from '../types'
export const getBannerAction:()=>any = ()=>{
  return (dispatch:Dispatch)=>{
    return getBanner({type:2}).then(data=>{
      console.log(data)
      dispatch({type:SETBANNERLIST,bannerList:data.banners})
    })
  }
}